package com.priusoft.api.domain;

import com.github.pagehelper.Page;

import java.util.HashMap;

public class PageDomain extends HashMap<String, Object> {

    public PageDomain()
    {
    }

    @Override
    public PageDomain put(String key, Object value)
    {
        super.put(key, value);
        return this;
    }

    public PageDomain putSource(String key, Page value)
    {
        super.put("total",value.getTotal());
        super.put(key, value.getResult());
        return this;
    }
}
